import React from 'react'
import {connect} from 'react-redux'
import LoginState from './login/login'
import Out from './login/out'
import {BrowserRouter, HashRouter, Switch, Router, Route} from 'react-router-dom'

class App extends React.Component {
    render() {
        console.log(this.props)
        return (
            <HashRouter>
                <div id='app'>
                    <Switch>
                        <Route path="/login" component={LoginState}/>
                        <Route path="/out" component={Out}/>
                    </Switch>
                </div>
            </HashRouter>

        )
    }
}
// export default connect((state, props) => {
//     return state
// })(App)
// 如果那个组件需要redux里面的数据，只需要connect包装一下，返回state即可
export default connect(state => state)(App)